﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using BioBooking.Client.Screens;
using BioBooking.Data;
using BioBooking.Client.Screens.Popups;
using System.Windows.Markup;

namespace BioBooking.Client
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            ////Booking booking = new Booking();
            ////frame.Navigate(new CRUDMovie());
            ////Movies movies = new Movies();
            ////frame1.Navigate(new Movies());

            //tbBooking.Content = new Frame() { Content = new Booking() };
            //tbCurrentMovies.Content = new Frame() { Content = new CurrentShowings() };
            //tbMoviesCrud.Content = new Frame() { Content = new CRUDMovie() };

            //IRepository db = Repository.GetRepository();
            //Showing show = db.GetShow(12);
            //seatPresenter.DataContext = show.SeatStates;
        }

        private void tabContainer_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            //ServiceReference.Service1Client client = new ServiceReference.Service1Client();
            //lblServiceTest.Content = client.listAllActiveMovies().First().Genre.Title;
            //winCRUDMovie movies = new winCRUDMovie();
            //movies.Show();
            //movies.Owner = this;
            //tbContainer.ItemsSource = new List<Frame>() { new Frame() { Content = new Movies() }, new Frame() { Content = new Showing() } };
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void miAbout_Click(object sender, RoutedEventArgs e)
        {
            About aboutWindow = new About();
            aboutWindow.Owner = this;
            aboutWindow.ShowInTaskbar = false;
            aboutWindow.Show();
        }

        private void miCloseApp_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (MessageBox.Show("Er du sikker på du vil lukke?", "Vil du lukke?", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No)
                e.Cancel = true;
        }

        private void tabItem6_Loaded(object sender, RoutedEventArgs e)
        {
            wizard1.Steps = new List<UserControl>() 
            { 
                new winMovies(wizard1)
            };
            wizard1.SetCurrentViewIndex(0);
        }

    }
}
